import request from '@/utils/request';
import { stringify } from 'qs';
import { toFormData } from '@/utils/utils.jsx';
import func from '@/utils/func';

//是否自动生成系统商品
export async function isSyncSysGoods() {
  return request(`/blade-user/usercfg/isSyncSysGoods`);
}

//设置生成系统商品
export async function setIsSyncSysGoods(params) {
  return request(`/blade-user/usercfg/setIsSyncSysGoods?${stringify(params)}`, {
    method: 'POST',
  });
}

//查询商品匹配规则
export async function queryGoodsCodeSwitch(params) {
  return request(`/blade-user/usercfg/getGoodsCodeSwitch?${stringify(params)}`);
}

//设置商品规则
export async function setGoodsCodeSwitch(params) {
  return request(
    `/blade-user/usercfg/setGoodsCodeSwitch?${stringify(params)}`,
    {
      method: 'POST',
    }
  );
}
